package ks.client.gui.user.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import ks.client.lobby.Lobby;

public class IconClick implements ActionListener{
	
	Lobby lobby;
	JLabel picture;
	ImageIcon icon;
	
	public IconClick(Lobby lobby, ImageIcon icon){
		this.lobby = lobby;
		this.icon = icon;
		picture = lobby.getAccountUpdateGUI().getPic();
	}
	
	
	public void actionPerformed(ActionEvent e){
		picture.setIcon(icon);
		picture.setName(icon.getDescription());
	}

}
